i=1;
while i<1000:
    a=i//100
    b=i%100//10
    c=i%10
    if pow(a,3)+pow(b,3)+pow(c,3)==i:
        print(i)
    i+=1;
